package test.my.com.myapplicationtest.zhe_xian_tu_view;

import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import java.util.ArrayList;
import java.util.List;

import test.my.com.myapplicationtest.R;
import test.my.com.myapplicationtest.zhe_xian_tu_view.DynamicPathView.controller.DrawGraphController;
import test.my.com.myapplicationtest.zhe_xian_tu_view.DynamicPathView.controller.model.DrawModel;
import test.my.com.myapplicationtest.zhe_xian_tu_view.DynamicPathView.draw.DrawView;
import test.my.com.myapplicationtest.zhe_xian_tu_view.DynamicPathView.draw.model.PathXY;

/**
 * Author : Cooper
 * Time : 2016/10/9  11:03
 * Description :
 */

public class ZheXianTuActivity extends Activity {

    private DrawGraphController mController;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.aty_zhe_xian_tu_layout);
        DrawView zhe_xian_tu_v = (DrawView) findViewById(R.id.zhe_xian_tu_v);
        mController = new DrawGraphController(zhe_xian_tu_v);

        String[] data = {"06-01","06-02","06-03","06-04","06-05","06-06","06-07"};
        float[] price = {0,0,0,0,50,55,120000};
        List<DrawModel> drawModelList = new ArrayList<>();
        for (int i =0;i<7;i++) {
            DrawModel drawModel = new DrawModel();
            drawModel.setPriceY(price[i]);
            drawModel.setTimeX(data[i]);
            drawModelList.add(drawModel);
        }
        mController.setData(drawModelList);
    }
}
